package com.bilicute.libman.util;

import java.util.regex.Pattern;

/**
 * @所属包名: com.bilicute.libman.util
 * @类名: StringUtil
 * @作者: i囡漫笔
 * @描述: String字符串检查
 * @创建时间: 2024-06-20 09:02
 */


public class StringUtil {

    public static boolean isEmail(String email) {
        final String EMAIL_REGEX = "^[A-Za-z\\d+_.-]+@[A-Za-z\\d.-]+$";
        final Pattern EMAIL_PATTERN = Pattern.compile(EMAIL_REGEX);
        return EMAIL_PATTERN.matcher(email).matches();
    }

    public static boolean isEmptyString(String string) {
        return string == null || string.isEmpty() || string.trim().isEmpty();
    }

    public static boolean noGreaterThan6(String strings){
        return strings.length() <= 6 || strings.contains(" ");
    }



}
